﻿<%@ Page Language="vb" AutoEventWireup="false" MasterPageFile="~/Master_Page/Master_Popup.Master" CodeBehind="FrmTariff_Popup.aspx.vb" Inherits="I_PORT.FrmTariff_Popup" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
      <table width="100%" border="0" cellpadding="0" cellspacing="0">
           <tr>
              <td>
                 <table width="100%" border="0" cellpadding="0" cellspacing="0">
                     <tr>
                         <td colspan="2" style="height:5px;" ><img src="../Image/space.gif" /></td>
                     </tr>
                    <tr>
                       <td style="width:20%;" align="right"><asp:Label ID="lbTariff" runat="server" SkinID="lbtxt" Text="Tariff :"></asp:Label>&nbsp;</td>
                       <td align="left">
                           <asp:TextBox ID="txtTariff" runat="server" Width="200px"></asp:TextBox>  
                       &nbsp;<asp:Button ID="btnSearchTariff" runat="server" Text="ค้นหา" CssClass="ButtonStyle" /></td>
                    </tr>
                    <tr>
                         <td colspan="2" style="height:5px;" ><img src="../Image/space.gif" /></td>
                     </tr>
                     <tr>
                        <td colspan="2" align="center">
                           <asp:GridView ID="gridTariff" runat="server" SkinID="gridblue"  DataKeyNames="KBETR,KONWA"
                     AutoGenerateColumns="False">
                     <PagerTemplate>
                                            <table>
                                                <tr>
                                                    <td>
                                                        <asp:ImageButton ID="ImgFirst" runat="server" Height="22px" ImageUrl="../Image/arrow-first.gif"
                                                            OnCommand="Paginate" CommandArgument="First" CommandName="Page" />
                                                    </td>
                                                    <td>
                                                        <asp:ImageButton ID="ImgBack" runat="server" Height="22px" ImageUrl="../Image/arrow-back.gif"
                                                            OnCommand="Paginate" CommandArgument="Prev" CommandName="Page" />
                                                    </td>
                                                    <td valign="top">
                                                        Page
                                                        <asp:DropDownList ID="ddlPage" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlPage_SelectedIndexChanged">
                                                        </asp:DropDownList>
                                                        of
                                                        <asp:Label ID="lbPageCount" runat="server" Text="Label"></asp:Label>
                                                    </td>
                                                    <td>
                                                        <asp:ImageButton ID="ImgNext" runat="server" Height="22px" ImageUrl="../Image/arrow-next.gif"
                                                            OnCommand="Paginate" CommandArgument="Next" CommandName="Page" />
                                                    </td>
                                                    <td>
                                                        <asp:ImageButton ID="ImgEnd" runat="server" Height="22px" ImageUrl="../Image/arrow-end.gif"
                                                            OnCommand="Paginate" CommandArgument="Last" CommandName="Page" />
                                                    </td>
                                                </tr>
                                            </table>
                                        </PagerTemplate>
                     <Columns>
                         <asp:BoundField HeaderText="รหัส" DataField="MATERIAL"/>
                         <asp:BoundField HeaderText="ชื่อ" DataField="Text_line"  ItemStyle-HorizontalAlign="Center" >
                         </asp:BoundField>
                         <asp:BoundField HeaderText="หน่วย" DataField="Unit" ItemStyle-HorizontalAlign="Center"  >
                         </asp:BoundField>
                         <asp:TemplateField HeaderText="เพิ่ม">
                             <ItemTemplate>
                                 <asp:Button ID="btnAdd" runat="server" CommandName="cmdadd"  CommandArgument="<%# Container.DataItemIndex %>" Text="เพิ่ม" />
                             </ItemTemplate>
                         </asp:TemplateField>
                     </Columns>
                 </asp:GridView>
                        </td>
                     </tr>
                      <tr>
                         <td colspan="2" style="height:5px;" ><img src="../Image/space.gif" /></td>
                     </tr>
                     <tr>
                        <td colspan="2" align="center">
                           <fieldset style="width:90%"><legend style="color:#848585; font-family:Tahoma;font-size:14px;font-weight:bold;">รายการ Material ที่เลือก</legend>
                           <table width="100%" border="0" cellpadding="0" cellspacing="0">
                            <tr>
                                <td style="height:5px;" ><img src="../Image/space.gif" /></td>
                            </tr>
                             <tr>
                                <td align="center">
                                <asp:GridView ID="gridMatuse" runat="server" SkinID="gridblueNoPage"  DataKeyNames="MAT_Default"
                     AutoGenerateColumns="False">
                     <Columns>
                         <asp:TemplateField HeaderText="ลำดับ" HeaderStyle-Wrap="false" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="35px">
                               <ItemTemplate>
                                 <%#Container.DataItemIndex+1 %>
                               </ItemTemplate>
<HeaderStyle Wrap="False"></HeaderStyle>
<ItemStyle HorizontalAlign="Center" Width="35px"></ItemStyle>
                         </asp:TemplateField>
                         <asp:BoundField HeaderText="รหัส" DataField="MATERIAL"/>
                         <asp:BoundField HeaderText="ชื่อ" DataField="Text_line" ItemStyle-HorizontalAlign="Center" >
                         </asp:BoundField>
                         <asp:TemplateField HeaderText="จำนวน" ItemStyle-Width="38px">
                             <ItemTemplate>
                                 <asp:TextBox ID="txtCount" runat="server" Text="<%# Bind('Count') %>" Width="35px"></asp:TextBox>
                             </ItemTemplate>
                             <ItemStyle HorizontalAlign="Center" />
                         </asp:TemplateField>
                         <asp:BoundField HeaderText="หน่วย" DataField="Unit" ItemStyle-HorizontalAlign="Center"  >
                         </asp:BoundField>
                     </Columns>
                 </asp:GridView>
                                </td>
                             </tr>
                             <tr>
                                <td style="height:5px;" ><img src="../Image/space.gif" /></td>
                            </tr>
                           </table>
                           
                           </fieldset>
                        </td>
                     </tr>
                     <tr>
                         <td colspan="2" style="height:5px;" ><img src="../Image/space.gif" /></td>
                     </tr>
                 </table>
              </td>
           </tr>
           <tr>
              <td align="center">
                  <asp:Button ID="btnSave" runat="server" Text="บันทึก" CssClass="ButtonStyle" />
                  <asp:Button ID="Button1" runat="server" Text="ยกเลิก" CssClass="ButtonStyle" /></td>
           </tr>
      </table>
</asp:Content>
